<template>
  <div class="setting">
    <el-input v-model="formData.key" placeholder="请输入key"></el-input>
    <el-input v-model="formData.value" placeholder="请输入value"></el-input>
    <el-input
      v-model="formData.ttl"
      type="number"
      placeholder="请输入ttl"
    ></el-input>
    <el-button type="primary" @click="submit">提交</el-button>
  </div>
</template>
<script>
import { submit } from "@/api/largeScreen.js";
export default {
  data() {
    return {
      formData: {
        key: "",
        value: "",
        ttl: "",
      },
    };
  },
  methods: {
    submit() {
      submit(this.formData).then((res) => {
        if (res.code === "2000") {
          if (res.code === "2000") {
            this.$message({
              message: "提交成功",
              type: "success",
            });
          }
        } else {
          this.$message.error("提交失败");
        }
      });
    },
  },
};
</script>
<style lang="less" scoped>
.setting {
  display: flex;
  .el-input {
    width: 200px;
    margin-right: 20px;
  }
}
</style>
